<html>
<head><meta charset="utf-8"><title>failed to bootstrap · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html">failed to bootstrap</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="237954484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237954484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> M. Herdiansyah <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237954484">(May 08 2021 at 13:03)</a>:</h4>
<p>Hello! As per Rust 1.52.0, I can't build Rust 1.52.0 due to an error:</p>
<div class="codehilite"><pre><span></span><code>thread &#39;main&#39; panicked at &#39;src.symlink_metadata() failed with No such file or directory (os error 2)&#39;, src/bootstrap/lib.rs:1196:24
</code></pre></div>
<p>This is my full log: <a href="https://0x0.st/-Bfn.txt">https://0x0.st/-Bfn.txt</a><br>
and this is my config.toml: <a href="https://0x0.st/-BfR.txt">https://0x0.st/-BfR.txt</a></p>
<p>There's no detail of which file/directory that doesn't exist. Any ideas? Rust 1.51.0 built normally though, so I have no idea here.</p>
<p>Full disclosure: My toolchain is a bit non-standard, since my toolchain has no gcc and its libs, I had to roll my own bootstrap tarball. Not sure if it's relevant here.</p>
<p>If you guys need anything else, I'll try to get it.</p>



<a name="237954686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237954686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237954686">(May 08 2021 at 13:07)</a>:</h4>
<p>Can you get a full log with -vvv or so? That'll show what its' trying to copy</p>



<a name="237955114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> M. Herdiansyah <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955114">(May 08 2021 at 13:13)</a>:</h4>
<p><a href="https://0x0.st/-BOq.txt">https://0x0.st/-BOq.txt</a></p>
<p>Looks like it's trying to copy <code>crtbegin.o</code>. It is provided by gcc but for clang + compiler-rt systems it seems to be provided by <code>/usr/lib/clang/&lt;ver&gt;/lib/linux/clang_rt.crtbegin-x86_64.o</code>.</p>



<a name="237955178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955178">(May 08 2021 at 13:14)</a>:</h4>
<p>hm</p>



<a name="237955185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955185">(May 08 2021 at 13:14)</a>:</h4>
<p>is it possible your compile is misconfigured in config.toml?</p>



<a name="237955198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955198">(May 08 2021 at 13:15)</a>:</h4>
<p>it looks like you probably want cc = clang or so</p>



<a name="237955233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955233">(May 08 2021 at 13:15)</a>:</h4>
<p>crtbegin.o comes from CC -print-file-name=crtbegin.o</p>



<a name="237955277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955277">(May 08 2021 at 13:16)</a>:</h4>
<p>so it seems like either your clang doesn't know where that file is or something similar is wrong</p>



<a name="237955337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237955337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237955337">(May 08 2021 at 13:17)</a>:</h4>
<p>you can comment out some lines in src/bootstrap/compile.rs (grep for crtbegin.o) if you don't care about the self-contained dir, I guess, but I'm not sure if that'll break something in the compiler itself</p>



<a name="237961957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237961957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> M. Herdiansyah <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237961957">(May 08 2021 at 15:02)</a>:</h4>
<p>I decided to patch <code>src/bootstrap/compile.rs</code> and <code>compiler/rustc_target/src/spec/crt_objects.rs</code> to look for clang's <code>crtbegin.o</code> and <code>crtend.o</code> instead and now it's building (it's on <code>cargo</code> now). As for breaking something in the compiler, I guess I'll find out when building something like Firefox or other Rust programs that I use, thanks!</p>



<a name="237962345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237962345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237962345">(May 08 2021 at 15:07)</a>:</h4>
<p>hm, I'd expect you could get that effect with cc = "clang" in config.toml, but I guess it depends on what clang -print-file-name=crtbegin.o spits out for you</p>



<a name="237962952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failed%20to%20bootstrap/near/237962952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> M. Herdiansyah <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failed.20to.20bootstrap.html#237962952">(May 08 2021 at 15:16)</a>:</h4>
<p>it spitted out <code>crtbegin.o</code> (not the path to clang's <code>/usr/lib/clang/&lt;ver&gt;/lib/linux/clang_rt.crtbegin-x86_64.o</code>), I'll have to reach out LLVM for that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>